Expose Prometheus metrics on /metrics, emit structured JSON logs with slog enriched with trace IDs, and instrument with OpenTelemetry for distributed traces. Correlate all three with a shared trace ID.
Metrics: request rate, error rate, latency (P50/P95/P99), goroutine count, GC pause time
Logs: structured JSON with traceID, spanID, requestID, userID on every entry
Traces: OpenTelemetry spans for HTTP requests, DB queries, outbound calls — visualized in Jaeger/Tempo
Correlate by injecting traceID into log context: span.SpanContext().TraceID().String()
Stack: Prometheus + Grafana (metrics), Loki (logs), Tempo/Jaeger (traces) — or Datadog/New Relic for managed
Suppose you need to add basic request latency metrics to a Go microservice. Which library would you choose and how would you expose the metrics for Prometheus?
If your service is logging JSON lines, what fields would you include to make logs useful for debugging in production?
How would you instrument a simple HTTP handler to emit a trace span using OpenTelemetry?
Your recent deployment caused a spike in error rates, but the logs don’t show any stack traces. Walk me through how you would use metrics, logs, and traces to pinpoint the issue.
When adding observability to a new feature, you notice increased CPU usage due to metric collection. How would you balance metric granularity versus overhead?
Explain how you would correlate a request’s trace ID across services when the downstream service is written in a different language.
Design an end‑to‑end observability pipeline for a fleet of Go microservices handling 10k RPS, covering metric aggregation, log storage, and trace sampling. Discuss trade‑offs.
Your tracing backend is hitting storage limits during peak traffic. What strategies would you employ to reduce trace volume without losing critical debugging information?
How would you ensure that observability instrumentation does not become a source of latency or panic in a high‑throughput Go service?
At a large organization, you need to standardize observability across dozens of teams with heterogeneous tech stacks. How would you define a unified approach for metrics, logs, and traces, and drive adoption?
A legacy Go service uses custom logging and no tracing. Outline a migration plan to bring it into the modern observability platform while minimizing risk.
Discuss the long‑term maintenance challenges of observability data (retention, schema evolution, cost) and how you’d address them at the architectural level.